﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SocialIn.Biz;

namespace SocialIn.Web.UserControls
{

    public partial class UCUserInfoView : System.Web.UI.UserControl
    {
        Join _join;

        protected void Page_Load(object sender, EventArgs e)
        {
            Setting();
        }

        private void Setting()
        {
            if (HttpContext.Current.Session[ConfigName.SessionMember] == null)
            {
                Response.Redirect("/Members/Login.aspx");
                return;
            }

            Member loginuser = HttpContext.Current.Session[ConfigName.SessionMember] as Member;

            string userid = loginuser.UserID;
            trlMemberName.Text = loginuser.UserName;
            imgUserPicture.ImageUrl = loginuser.PicturePath;

            string usertype = loginuser.UserType;
            _join = new Join();

            if (usertype == "R003")
            {
                pnlStats.Visible = true;
            }

            dlTalentCategory.DataSource = _join.GetTalentList(userid);
            dlTalentCategory.DataBind();
        }
    }
}